<template>
<div>
        <van-row>
        <van-col span="24"><hea /></van-col>
        <van-col span="3"><left /></van-col>
        <van-col span="21">
    账号：<input type="text">
    姓名：<input type="text">
    手机号：<input type="text">
    <van-button icon="search">查询</van-button>
    <van-button>重置</van-button>
    <br />
    <van-button @click="adduser">新增</van-button>
    <van-button>删除</van-button>
    <van-button>导出</van-button>
    <van-button>冻结</van-button>
    <van-button>解冻</van-button>
    <van-button>回收站</van-button>
    <table border="1">
        <tr>
            <th>账号</th>
            <th>姓名</th>
            <th>性别</th>
            <th>手机号</th>
            <th>操作</th>
        </tr>
        <tr v-for="data in datas" :key="data.id">
            <td>{{data.admin}}</td>
            <td>{{data.password}}</td>
            
            <td>{{data.gender}}</td>
            <td>{{data.mobile}}</td>
            <td>
            <van-button>
                添加
            </van-button></td>

        </tr>
    </table>



        </van-col>
    </van-row>
    

</div>
  
</template>


<script>

import axios from 'axios'
import left from '../components/comm/left.vue'
import hea from '../components/comm/hea.vue'
export default {
    data(){
        return{
            datas:[],
            fromdata:{

            }
        }
    },
    components:{
        'left':left,
        'hea':hea
    },
    methods:{
        getuser(){
            axios({url:'getuser',method:'get'}).then(res=>{
                this.datas = res.data.list
                console.log(res);
            })
        }
    },
    mounted(){
        this.getuser()
    }

}
</script>

<style>

</style>